<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head data-th-replace="admin/common/head"></head>
<body>
<!-- Navigation -->
<th:block data-th-replace="admin/common/navigation"></th:block>

<div id="page-wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">店铺管理</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!--
    <div class="row">
        <div class="col-lg-12">
            <a href="/superadmin/campusmanage">校区管理</a>&raquo;<a href="#">校区修改</a>
        </div>
    </div>
    -->
    <div class="row">
        <div class="col-lg-12">
            <!--Form begin -->
            <form th:action="@{'/campusadmin/shopmanage/editshop/updateshopname/'+${seller.id}}"  method="post" role="form">
                <div class="form-group has-success">
                    <label class="control-label" for="inputSuccess">店铺名称:</label>
                    <span th:text="${seller.shopName}"></span>
                    <input type="text" class="form-control" id="inputSuccess" name="shopName"/>
                </div>
                <button class="btn btn-success">修改</button>
            </form>
            <!--Form end   -->
            <hr/>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <h1>商品管理</h1>
        </div>
    </div>


    <div class="row">
        <div class="col-lg-12">
            <!-- table begin -->
            <div class="panel panel-default">
                <div class="panel-heading">
                    商品列表
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">
                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <th>#</th>
                                <th>商品名称</th>
                                <th>商品价格</th>
                                <th>商品描述</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="product,iterStatus: ${products}">
                                <td th:text="${iterStatus.count}">1</td>
                                <td th:text="${product.name}">163888</td>
                                <td th:text="${product.price}">狗银</td>
                                <td th:text="${product.description}" style="width: 950px">狗银</td>
                                <td>
                                    <a href="#" th:if="${product.isShelf}" th:href="@{'/campusadmin/shopmanage/unshelfproduct/'+${seller.id}+'/'+${product.id}}" class="btn btn-success">下架</a>
                                    <a href="#" th:if="!${product.isShelf}" class="btn btn-danger">已下架</a>
                                    <a href="#" th:href="@{'/campusadmin/shopmanage/deleteproduct/'+${seller.id}+'/'+${product.id}}" class="btn btn-danger">删除</a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <!-- /.table-responsive -->
                </div>
                <!-- /.panel-body -->
            </div>
            <!-- table end   -->

        </div>
    </div>



    <!-- /.row -->
</div>
<!-- /#page-wrapper -->

<!-- Scripts -->
<th:block data-th-replace="admin/common/scripts"></th:block>
</body>
</html>